package cn.wei.youvie.service;

import cn.wei.youvie.common.servlet.DeleteRequest;
import cn.wei.youvie.domain.dto.section.SectionAddRequest;
import cn.wei.youvie.domain.dto.section.SectionQueryRequest;
import cn.wei.youvie.domain.dto.section.SectionUpdateRequest;
import cn.wei.youvie.domain.entity.Section;
import cn.wei.youvie.domain.vo.SectionVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
* @author Youvie
* @description 针对表【sections(存储章节中的节或段落信息)】的数据库操作Service
* @createDate 2024-08-27 21:02:19
*/
public interface SectionService extends IService<Section> {

    Integer add(SectionAddRequest sectionAddRequest, HttpServletRequest request);

    boolean deleteSection(DeleteRequest deleteRequest, HttpServletRequest request);

    boolean updateSection(SectionUpdateRequest sectionUpdateRequest, HttpServletRequest request);

    SectionVO getSectionVO(Section section, HttpServletRequest request);

    Wrapper<Section> getQueryWrapper(SectionQueryRequest sectionQueryRequest);

    Page<SectionVO> getSectionVOPage(Page<Section> chapterPage, HttpServletRequest request);
}
